<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<html lang="en">
<!--<![endif]-->

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <meta name="keywords" content="">

    <title>Socket Programming</title>

    {% load static %}
    <link rel="stylesheet" type="text/css" href="{%static 'wikipages/fonts/font-awesome-4.3.0/css/font-awesome.min.css' %}">
    <link rel="stylesheet" type="text/css" href="{%static 'wikipages/css/stroke.css' %}">
    <link rel="stylesheet" type="text/css" href="{%static 'wikipages/css/bootstrap.css' %}">
    <link rel="stylesheet" type="text/css" href="{%static 'wikipages/css/animate.css' %}">
    <link rel="stylesheet" type="text/css" href="{%static 'wikipages/css/prettyPhoto.css' %}">
    <link rel="stylesheet" type="text/css" href="{%static 'wikipages/css/style.css' %}">
    <link rel="stylesheet" type="text/css" href="{%static 'wikipages/js/syntax-highlighter/styles/shCore.css' %}" media="all">
    <link rel="stylesheet" type="text/css" href="{%static 'wikipages/js/syntax-highlighter/styles/shThemeRDark.css' %}" media="all">
    <link rel="stylesheet" type="text/css" href="{%static 'wikipages/css/custom.css' %}">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>

<body>

    <div id="wrapper">

        <div class="container">

            <section id="top" class="section docs-heading">

                <div class="row">
                    <div class="col-md-12">
                        <div class="big-title text-center">
                            <h1>Socket Programming</h1>
                        </div>
                        <!-- end title -->
                    </div>
                    <!-- end 12 -->
                </div>
                <!-- end row -->

                <hr>

            </section>
            <!-- end section -->

            <div class="row">

                <div class="col-md-3">
                    <nav class="docs-sidebar" data-spy="affix" data-offset-top="300" data-offset-bottom="200" role="navigation">
                        <ul class="nav">
                            <li><a href="#line1">Introduction</a></li>
                            <li><a href="#line2">Stream Sockets</a>
                              <ul class="nav">
                                  <li><a href="#line2_1">Description</a></li>
                                  <li><a href="#line2_2">TCP</a></li>
                                  <!-- <li><a href="#line2_31">Example</a></li> -->
                              </ul>
                            </li>
                            <li><a href="#line3">Datagram Sockets</a>
                              <ul class="nav">
                                  <li><a href="#line3_1">Description</a></li>
                                  <li><a href="#line3_21">UDP</a></li>
                                  <!-- <li><a href="#line3_3">Example</a></li> -->
                              </ul>
                            </li>
                        </ul>
                    </nav >
                </div>
                <div class="col-md-9">
                    <section id = "line1" class="welcome">

                        <div class="row">
                            <div class="col-md-12 left-align">
                                <h2 class="dark-text">Introduction<hr></h2>
                                <div class="row">

                                    <div class="col-md-12 full">
                                        <div class="intro1">
                                            <ul>
                                                <!-- <li><strong>Demo Page : </strong><a href="http://themeforest.net/user/surjithctly" target="_blank">Click Here</a></li> -->
                                                <li><strong>Front End Developers : </strong>Akhil Udathu</li>
                                                <li><strong>Backend End Developers : </strong>Akhil Udathu</li>
                                                <li><strong>Server Side Integration : </strong>Sagar Bharadwaj</li>
                                                <li><strong>Content : </strong>Akhil Udathu</li>
                                            </ul>
                                        </div>

                                        <hr>
                                        <div>
                                            <p>A socket is one of the most fundamental technologies of computer network programming. Sockets allow network software applications to communicate using standard mechanisms built into network hardware and operating systems.
                                            </p>

                                            <p>A socket represents a single connection between exactly two pieces of software (a so-called point-to-point connection). More than two pieces of software can communicate with client/server or distributed systems by using multiple sockets.
                                            </p>

                                            <p>Socket-based software usually runs on two separate computers on the network, but sockets can also be used to communicate locally (inter-process) on a single computer. Sockets are bidirectional, meaning that either side of the connection is capable of both sending and receiving data. The one application that initiates communication is termed the "client" and the other application the "server"
                                            </p>

                                            <h4>Types of Protocols</h4>
                                            <ol>
                                                <li>Transmission Control Protocol</li>
                                                <li>User Datagram Protocol</li>
                                            </ol>
                                        </div>
                                    </div>
                                </div>
                                <!-- end row -->
                            </div>
                        </div>
                    <hr>
                    </section>

                    <section id="line2" class="section">

                        <div class="row">
                            <div class="col-md-12 left-align">
                                <h2 class="dark-text">Stream Sockets<a href="#top">#back to top</a><hr></h2>
                            </div>
                            <!-- end col -->
                        </div>
                        <!-- end row -->

                        <div class="row">
                                <h4 id="line2_1">Description</h4>
                                <p>Delivery in a networked environment is guaranteed. If you send through the stream socket three items "A, B, C", they will arrive in the same order − "A, B, C". These sockets use TCP (Transmission Control Protocol) for data transmission. If delivery is impossible, the sender receives an error indicator. Data records do not have any boundaries.</p><!-- end col -->
                        </div>
                        <!-- end row -->

                        <hr>
                        <div class="row">
                                <h4 id="line2_2">Salient Features of TCP</h4>
                                <ol>
                                    <li>Connection oriented protocol</li>
                                    <li>Reliable service</li>
                                    <li>Uses Stream Sockets</li>
                                    <li>Based on acknowledgments</li>
                                    <li>Manages flow control i.e. order of datagrams will be preserved</li>
                                    <li>Generally used when data is to be transferred to a central server in a reliable manner</li>
                                </ol>
                            <!-- end col -->
                        </div>
                        <hr>
                        <!-- <div class = "row">
                          <h4 id ="line2_31">Example</h4>
                        </div>
                        <div class="col-md-6" align = "center">
                            <a href="upload/thumbnail.png" data-rel="prettyPhoto"><img src="images/upload/thumbnail.png" alt="" class="img-responsive img-thumbnail"></a>
                            <h4>Demo</h4>
                        </div> -->

                    </section>
                    <!-- end section -->

                    <section id="line3" class="section">
                        <div class="row">
                            <div class="col-md-12 left-align">
                                <h2 class="dark-text">Datagram Sockets<a href="#top">#back to top</a><hr></h2>
                            </div>
                            <!-- end col -->
                        </div>
                        <!-- end row -->

                        <div class="row">
                                <h4 id="line3_1">Description</h4>
                                <p>Delivery in a networked environment is not guaranteed. They're connectionless because you don't need to have an open connection as in Stream Sockets − you build a packet with the destination information and send it out. They use UDP (User Datagram Protocol).</p><!-- end col -->
                        </div>
                        <!-- end row -->

                        <hr>
                        <div class="row">
                                <h4 id="line3_21">Salient Features of UDP</h4>
                                <ol>
                                  <li>Connection-less protocol</li>
                                  <li>Uses Datagram sockets</li>
                                  <li>Message is encapsulated in a datagram</li>
                                  <li>Each datagram is characterized by a length</li>
                                  <li>Generally used when client requires a certain service from the server</li>
                                </ol>
                            <!-- end col -->
                        </div>
                        <hr>

                        <!-- <div class = "row">
                          <h4 id ="line3_3">Example</h4>
                        </div>
                        <div class="col-md-6" align = "center">
                            <a href="upload/thumbnail.png" data-rel="prettyPhoto" align = "center"><img src="images/upload/thumbnail.png" alt="" class="img-responsive img-thumbnail"></a>
                            <h4>Demo</h4>
                        </div> -->
                        <!-- end col -->
                    </section>
                    <!-- end section -->

                </div>
                <!-- // end .col -->

            </div>
            <!-- // end .row -->

        </div>
        <!-- // end container -->

    </div>
    <!-- end wrapper -->

    <script src="{%static 'wikipages/js/jquery.min.js' %}"></script>
    <script src="{%static 'wikipages/js/bootstrap.min.js' %}"></script>
    <script src="{%static 'wikipages/js/retina.js' %}"></script>
    <script src="{%static 'wikipages/js/jquery.fitvids.js' %}"></script>
    <script src="{%static 'wikipages/js/wow.js' %}"></script>
    <script src="{%static 'wikipages/js/jquery.prettyPhoto.js' %}"></script>
    <script src="{%static 'wikipages/js/custom.js' %}"></script>
    <script src="{%static 'wikipages/js/main.js' %}"></script>
    <script src="{%static 'wikipages/js/syntax-highlighter/scripts/shCore.js' %}"></script>
    <script src="{%static 'wikipages/js/syntax-highlighter/scripts/shBrushXml.js' %}"></script>
    <script src="{%static 'wikipages/js/syntax-highlighter/scripts/shBrushCss.js' %}"></script>
    <script src="{%static 'wikipages/js/syntax-highlighter/scripts/shBrushJScript.js' %}"></script>

</body>

</html>
